package com.one.service;

import com.one.pojo.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;

/**
 * @Description
 * @Author semstouch
 * @Date 2017/4/7
 **/
@Service
public interface OneUserService {
    boolean addOneUser(OneUser oneUser);

    boolean addOneUserAndStore(OneUser oneUser, Store registerStore, UserTrasRecord userTrasRecord);

    boolean updateOneUser(OneUser oneUser);

    boolean updateOneUserAndStore(OneUser oneUser, Store store);

    boolean updateOneUserAndStore(OneUser oneUser, Store store, DogRecord dogRecord);

    OneUser findByPhone(String phone);

    OneUser findByUserId(String userId);

    OneUser findByLoginName(String loginName);

    BigDecimal totalMoney();

    BigDecimal previousMoney(String start, String end);

    boolean userActive(OneUser oneUser, Store store, Store activeStore, UserTrasRecord userTrasRecord);

    List<OneFriend> findFriend(String upperUserRefId);

    List<OneUser> findAll();

    List<OneUser> selectPageList(int offset, int pageSize);

    int selectPageCount();

}
